package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.domain.Reason;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 服务认证相关接口
 *
 * @Author huang
 * @Date 2025/7/1 2025/7/1
 */
@RestController("workerServeCertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务认证相关接口")
public class ServeCertificationController {

    @Autowired
    private IWorkerCertificationService workerCertificationService;
    /**
     * 服务端提交认证申请
     * @param dto
     */
    @PostMapping
    @ApiOperation("服务端提交认证申请")
    public void serveCommit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertificationService.serveCommit(dto);
    }
    /**
     * 查询最新的驳回原因
     * @param
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public Reason rejectReason() {
        return workerCertificationService.rejectReason();
    }

}
